package com.hn.sanya.demo.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.JSONPObject;
import com.hn.sanya.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
　　* @Description: 测试控制器
　  * @author syiti
    * @Method
　　* @params
　　* @return
　　* @date 2018/3/9 11:24
　　*/
@Controller
@RequestMapping(value ="user")
public class UserController {

    @Autowired
    private UserService userService;

    //首页
    @RequestMapping(value = "index",method = RequestMethod.GET)
    public String index(){
        return "index";
    }

    //跳转到登录页面
    @RequestMapping(value = "login",method = RequestMethod.GET)
    public String login(){
        return "login";
    }

    //跳转到登录页面
    @RequestMapping(value = "loginCheck",method = RequestMethod.POST)
    @ResponseBody
    public boolean loginCheck(@RequestBody String json){



        return true;
    }
}
